package com.ruoyi.iot.service.impl;

import java.util.List;

import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.iot.mapper.FacDevicesMonitorParamMapper;
import com.ruoyi.iot.domain.FacDevicesMonitorParam;
import com.ruoyi.iot.service.IFacDevicesMonitorParamService;

/**
 * 设备类型监测参数Service业务层处理
 * 
 * @author rww
 * @date 2024-06-21
 */
@Service
public class FacDevicesMonitorParamServiceImpl implements IFacDevicesMonitorParamService 
{
    @Autowired
    private FacDevicesMonitorParamMapper facDevicesMonitorParamMapper;

    /**
     * 查询设备类型监测参数
     * 
     * @param id 设备类型监测参数主键
     * @return 设备类型监测参数
     */
    @Override
    public FacDevicesMonitorParam selectFacDevicesMonitorParamById(Long id)
    {
        return facDevicesMonitorParamMapper.selectFacDevicesMonitorParamById(id);
    }

    /**
     * 查询设备类型监测参数列表
     * 
     * @param facDevicesMonitorParam 设备类型监测参数
     * @return 设备类型监测参数
     */
    @Override
    public List<FacDevicesMonitorParam> selectFacDevicesMonitorParamList(FacDevicesMonitorParam facDevicesMonitorParam)
    {
        return facDevicesMonitorParamMapper.selectFacDevicesMonitorParamList(facDevicesMonitorParam);
    }

    /**
     * 新增设备类型监测参数
     * 
     * @param facDevicesMonitorParam 设备类型监测参数
     * @return 结果
     */
    @Override
    public int insertFacDevicesMonitorParam(FacDevicesMonitorParam facDevicesMonitorParam)
    {
        facDevicesMonitorParam.setId(IdUtil.getSnowflakeNextId());
        return facDevicesMonitorParamMapper.insertFacDevicesMonitorParam(facDevicesMonitorParam);
    }

    /**
     * 修改设备类型监测参数
     * 
     * @param facDevicesMonitorParam 设备类型监测参数
     * @return 结果
     */
    @Override
    public int updateFacDevicesMonitorParam(FacDevicesMonitorParam facDevicesMonitorParam)
    {
        return facDevicesMonitorParamMapper.updateFacDevicesMonitorParam(facDevicesMonitorParam);
    }

    /**
     * 批量删除设备类型监测参数
     * 
     * @param ids 需要删除的设备类型监测参数主键
     * @return 结果
     */
    @Override
    public int deleteFacDevicesMonitorParamByIds(Long[] ids)
    {
        return facDevicesMonitorParamMapper.deleteFacDevicesMonitorParamByIds(ids);
    }

    /**
     * 删除设备类型监测参数信息
     * 
     * @param id 设备类型监测参数主键
     * @return 结果
     */
    @Override
    public int deleteFacDevicesMonitorParamById(Long id)
    {
        return facDevicesMonitorParamMapper.deleteFacDevicesMonitorParamById(id);
    }
}
